﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html class="x-admin-sm">
<head>
    <meta name="viewport" content="width=device-width" />
    <meta charset="UTF-8">
    <title>生产计划添加</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link href="~/Content/X-admin/css/font.css" rel="stylesheet" />
    <script src="~/Content/X-admin/lib/layui/layui.js"></script>
    <link href="~/Content/X-admin/css/xadmin.css" rel="stylesheet" />
    <script src="~/Content/X-admin/js/jquery.min.js"></script>
    <script src="~/Content/X-admin/js/xadmin.js"></script>
    <script src="~/Content/Scripts/System/systemFrame.js"></script>
    <script src="~/Content/Scripts/System/Common.js"></script>

</head>
<body>
    <span style="margin-top:15px;margin-left:15px">
        <xblock>
            <button class="layui-btn" onclick="saveReset()"><i class="layui-icon"></i>保存</button>
            <button class="layui-btn" onclick="closeWin()"><i class="layui-icon">&#x1006;</i>取消</button>
        </xblock>
    </span>

    <div style="margin: 20px; border: 1px solid #dbdbdb;padding:15px">

        <form id="AddForm" class="layui-form layui-col-space5">

            <div class="layui-form-item layui-form-text">
   
                <textarea placeholder="请输入内容" id="barCodes" name="barCodes" class="layui-textarea" readonly></textarea>

            </div>
          


            <div class="layui-form-item layui-form-text">

                <label for="L_email" class="layui-form-label">
                   条码类型
                </label>
                <div class="layui-inline layui-show-xs-block">
                    <select id="barType" name="barType" class="barType"></select>
                </div>
            </div>

            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">
                条码状态
                </label>
                <input lay-skin='primary' type='checkbox' value='1' title='清空状态' name='barStatus' />
            </div>
     
        </form>
       
    </div>
</body>
</html>
<script type="text/javascript">
    var bars = "";
    var u8Code = "";
    $(function () {
        bars = getUrlVariable("bars");
        $("#barCodes").val(bars);
        CommonData('tmlx', 'barType');
   
       
        layui.use('form', function () {
            var form = layui.form;
            form.render();
        });
    });

    // 保存数据
    function saveReset() {

        $.ajax({
            url: "../Bar/ReSetBar",
            data: { datas: JSON.stringify(FormToJson("AddForm"))},
            dataType: "json",
            type: "POST",
            success: function (data) {
                if (data.Result) {
                    layer.msg("操作成功！");
                    var index = parent.layer.getFrameIndex(window.name);
                    //关闭当前frame
                    parent.layer.close(index);
                } else {
                    layer.msg(data.Message);
                }
            }
        });
    }


  
</script>